package com.example.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.pojo.dto.AccessDTO;
import com.example.pojo.dto.ProjecttDTO;
import com.example.pojo.entity.Project;
import com.example.pojo.vo.ProjectVO;

import java.io.IOException;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

public interface ProjectService extends IService<Project> {

    /**
     * 分页获取项目信息
     * @param name
     * @param pageNum
     * @param pageSize
     * @return
     */
    Page<Project> selectPage(String name, Integer entrustId, Integer teamId, Boolean access, LocalDate begin, LocalDate end, String statuses, Integer pageNum, Integer pageSize);

    /**
     * 新增项目信息
     * @param project
     */
    void addProject(Project project);


    void updateProject(Project project);

    void deleteById(Integer id);

    void delBatch(List<Integer> ids);

    List<ProjectVO> getProjectListByUserId();

    Project selectById(Integer id);

    void accessProject(AccessDTO accessDTO) throws IOException;

    Project selectByName(String projectName);

    List<Map<String, Object>> getProjectInfoByDate(Integer currentYear, Integer currentMonth);

    //Map<Integer,List> allotBudget(Map<Integer, Integer> budget, List number);
    void allotBudget(Double budget);
}
